package com.sk.cardeal.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by sk on 2018/4/13.
 */

public class ByKindList {

    /**
     * returnCode : 1
     * returnMsg : 请求成功
     * resultList : [{"id":"402880ec604e811d01604f25f5e60002","code":"003","companyId":null,"pid":"0","partsName":"机油滤清器","states":1,"note":"","operator":"1","isdel":0,"type":0,"createTime":"2018-04-12 15:24:25","updateTime":"2018-04-12 15:44:04","carPartsList":[{"partsId":null,"partsName":"机油滤清器","partsOeCode":"","partsCount":null,"partsQualityList":null,"brandName":null,"brandCode":"402880ec6168d9cf016168f820a1010c","priceQx":null,"stockNum":null,"vin":"2558937","mileage":null,"name":"海拉(HELLA)机油滤清器(凌渡/奥迪A4L/Q5/Q7/斯柯达速派 EA888发动机)8XG 199 623-421","price":"67.00"}]},{"id":"402880ec6168d9cf016168f81c3500f0","code":"151788454604886026","companyId":null,"pid":"0","partsName":"机油","states":1,"note":"Excel配件导入自动生成的分类","operator":null,"isdel":0,"type":0,"createTime":"2018-02-06 10:35:46","updateTime":"2018-04-16 14:54:13","carPartsList":[{"partsId":null,"partsName":"机油","partsOeCode":"","partsCount":null,"partsQualityList":null,"brandName":null,"brandCode":"402880ec6168d9cf016168f8224d011c","priceQx":null,"stockNum":null,"vin":"932790","mileage":null,"name":"马勒(MAHLE)空气滤清器/空滤LX3312（奥迪Q5 2.0T / 奥迪A4L 1.8T/2.0T）","price":"59.00"}]},{"id":"402880ee62b8ba8c0162b8bd0d4a0001","code":"001","companyId":null,"pid":"0","partsName":"后刹车片","states":1,"note":"","operator":"1","isdel":0,"type":0,"createTime":"2018-04-12 15:23:40","updateTime":"2018-04-12 15:23:40","carPartsList":[]},{"id":"402880ee62b8ba8c0162b8bd707f0002","code":"002","companyId":null,"pid":"0","partsName":"火花塞","states":1,"note":"","operator":"1","isdel":0,"type":0,"createTime":"2018-04-12 15:24:06","updateTime":"2018-04-12 15:24:06","carPartsList":[]},{"id":"402880ee62b8ba8c0162b8bdf3280004","code":"004","companyId":null,"pid":"0","partsName":"空气滤清器","states":1,"note":"","operator":"1","isdel":0,"type":0,"createTime":"2018-04-12 15:24:39","updateTime":"2018-04-12 15:24:39","carPartsList":[]},{"id":"402880ee62b8ba8c0162b8be123d0005","code":"005","companyId":null,"pid":"0","partsName":"空调滤清器","states":1,"note":"","operator":"1","isdel":0,"type":0,"createTime":"2018-04-12 15:24:47","updateTime":"2018-04-12 15:24:47","carPartsList":[]},{"id":"402880ee62b8ba8c0162b8be4d0b0006","code":"006","companyId":null,"pid":"0","partsName":"前刹车片","states":1,"note":"","operator":"1","isdel":0,"type":0,"createTime":"2018-04-12 15:25:02","updateTime":"2018-04-12 15:25:02","carPartsList":[]},{"id":"402880ee62b8ba8c0162b8be6b210007","code":"007","companyId":null,"pid":"0","partsName":"蓄电池","states":1,"note":"","operator":"1","isdel":0,"type":0,"createTime":"2018-04-12 15:25:10","updateTime":"2018-04-12 15:25:10","carPartsList":[]}]
     * returnObject : null
     */

    private int returnCode;
    private String returnMsg;
    private Object returnObject;
    private List<ResultListBean> resultList;

    public int getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(int returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public Object getReturnObject() {
        return returnObject;
    }

    public void setReturnObject(Object returnObject) {
        this.returnObject = returnObject;
    }

    public List<ResultListBean> getResultList() {
        return resultList;
    }

    public void setResultList(List<ResultListBean> resultList) {
        this.resultList = resultList;
    }

    public static class ResultListBean implements Parcelable {
        /**
         * id : 402880ec604e811d01604f25f5e60002
         * code : 003
         * companyId : null
         * pid : 0
         * partsName : 机油滤清器
         * states : 1
         * note :
         * operator : 1
         * isdel : 0
         * type : 0
         * createTime : 2018-04-12 15:24:25
         * updateTime : 2018-04-12 15:44:04
         * carPartsList : [{"partsId":null,"partsName":"机油滤清器","partsOeCode":"","partsCount":null,"partsQualityList":null,"brandName":null,"brandCode":"402880ec6168d9cf016168f820a1010c","priceQx":null,"stockNum":null,"vin":"2558937","mileage":null,"name":"海拉(HELLA)机油滤清器(凌渡/奥迪A4L/Q5/Q7/斯柯达速派 EA888发动机)8XG 199 623-421","price":"67.00"}]
         */

        private String id;
        private String code;
        private String companyId;
        private String pid;
        private String partsName;
        private int states;
        private String note;
        private String operator;
        private int isdel;
        private int type;
        private String createTime;
        private String updateTime;
        private List<ByPartsEntity> carPartsList;
        private boolean isChoose = false;


        public boolean isChoose() {
            return isChoose;
        }

        public void setChoose(boolean choose) {
            isChoose = choose;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String  getCompanyId() {
            return companyId;
        }

        public void setCompanyId(String companyId) {
            this.companyId = companyId;
        }

        public String getPid() {
            return pid;
        }

        public void setPid(String pid) {
            this.pid = pid;
        }

        public String getPartsName() {
            return partsName;
        }

        public void setPartsName(String partsName) {
            this.partsName = partsName;
        }

        public int getStates() {
            return states;
        }

        public void setStates(int states) {
            this.states = states;
        }

        public String getNote() {
            return note;
        }

        public void setNote(String note) {
            this.note = note;
        }

        public String getOperator() {
            return operator;
        }

        public void setOperator(String operator) {
            this.operator = operator;
        }

        public int getIsdel() {
            return isdel;
        }

        public void setIsdel(int isdel) {
            this.isdel = isdel;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public List<ByPartsEntity> getCarPartsList() {
            return carPartsList;
        }

        public void setCarPartsList(List<ByPartsEntity> carPartsList) {
            this.carPartsList = carPartsList;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.code);
            dest.writeString(this.companyId);
            dest.writeString(this.pid);
            dest.writeString(this.partsName);
            dest.writeInt(this.states);
            dest.writeString(this.note);
            dest.writeString(this.operator);
            dest.writeInt(this.isdel);
            dest.writeInt(this.type);
            dest.writeString(this.createTime);
            dest.writeString(this.updateTime);
            dest.writeTypedList(this.carPartsList);
            dest.writeByte(this.isChoose ? (byte) 1 : (byte) 0);
        }

        public ResultListBean() {
        }

        protected ResultListBean(Parcel in) {
            this.id = in.readString();
            this.code = in.readString();
            this.companyId = in.readString();
            this.pid = in.readString();
            this.partsName = in.readString();
            this.states = in.readInt();
            this.note = in.readString();
            this.operator = in.readString();
            this.isdel = in.readInt();
            this.type = in.readInt();
            this.createTime = in.readString();
            this.updateTime = in.readString();
            this.carPartsList = in.createTypedArrayList(ByPartsEntity.CREATOR);
            this.isChoose = in.readByte() != 0;
        }

        public static final Parcelable.Creator<ResultListBean> CREATOR = new Parcelable.Creator<ResultListBean>() {
            @Override
            public ResultListBean createFromParcel(Parcel source) {
                return new ResultListBean(source);
            }

            @Override
            public ResultListBean[] newArray(int size) {
                return new ResultListBean[size];
            }
        };
    }
}
